package com.xueyi.game.backend.entity.dto;

import com.xueyi.game.backend.entity.po.BaseUser;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 描述 保存用户
 *
 * @auther 俞烨
 * @date 2022-11-08 19
 */
public class SaveBaseUserDto extends BaseUser {

    private Integer id;


    private String account;

    @NotBlank(message = "密码不能为空")
    @Length(max = 20, message = "密码的长度不能超过20")
    private String password;

    @NotBlank(message = "图片不能为空")
    private String uPhoto;

    @NotBlank(message = "手机号不能为空")
    @Length(max = 11, message = "手机号的长度为11位")
    private String uPhone;

    @NotBlank(message = "角色id不能为空")
    private String roleIds;


    @NotBlank(message = "昵称不能为空")
    private String uName;

    public String getuName() {
        return uName;
    }

    public void setuName(String uName) {
        this.uName = uName;
    }

    @Override
    public Integer getId() {
        return id;
    }

    @Override
    public void setId(Integer id) {
        this.id = id;
    }

    @Override
    public String getAccount() {
        return account;
    }

    @Override
    public void setAccount(String account) {
        this.account = account;
    }

    @Override
    public String getPassword() {
        return password;
    }

    @Override
    public void setPassword(String password) {
        this.password = password;
    }

    public String getuPhoto() {
        return uPhoto;
    }

    public void setuPhoto(String uPhoto) {
        this.uPhoto = uPhoto;
    }

    @Override
    public String getuPhone() {
        return uPhone;
    }

    @Override
    public void setuPhone(String uPhone) {
        this.account = uPhone;
        this.uPhone = uPhone;
    }

    public String getRoleIds() {
        return roleIds;
    }

    public void setRoleIds(String roleIds) {
        this.roleIds = roleIds;
    }
}
